﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//需要进行网络同步的实体的组件都应继承该类
/// <summary>
/// ECS同步组件基类
/// </summary>
    public  abstract class ECSMomentCompoentBase:ECSCompoentBase
{
    
    private int m_id;
    /// <summary>
    /// 同步组件的id（实体id）
    /// </summary>
    public int ID
    {
        get { return m_id;}
        set { m_id = value; }
    }

    private int m_frame;
    /// <summary>
    /// 同步组件目前处于哪一帧
    /// </summary>
    public int Frame
    {
        get { return m_frame; }
        set { m_frame = value; }
    }

    private bool m_isChange;
    /// <summary>
    /// 该同步组件是否已更改(拷贝后为false)
    /// </summary>
    public bool IsChange
    {
        get { return m_isChange; }
        set { m_isChange = value; }
    }
    /// <summary>
    /// copy当前同步组件，以用作预测时备份
    /// </summary>
    /// <returns></returns>
    public abstract ECSMomentCompoentBase DeepCopy();
}

